package com.aya.export.util;

import org.apache.poi.xssf.streaming.SXSSFWorkbook;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.List;

// ExcelUtils.java
public class ExcelUtils {
    public static byte[] toBytes(List<?> data) throws IOException {
        SXSSFWorkbook workbook = new SXSSFWorkbook(500);  // 内存控制‌:ml-citation{ref="1,3" data="citationList"}
        // 数据填充逻辑...
        ByteArrayOutputStream os = new ByteArrayOutputStream();
        workbook.write(os);
        return os.toByteArray();
    }
}
